package com.chenjinyan.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

/**
 * @author chenjinyan
 * @version 1.0
 */
@Data
public class GoodsVo {


    private Long userId;

    @Size(min = 1, max = 2, message = "物品种类长度非法")
    private Integer typeOfGoods;

    @Size(min = 2, max = 50, message = "信息标题输入长度非法")
    private String infoTittle;

    @Size(min = 2, max = 500, message = "描述输入长度非法")
    private String description;

    @Size(min = 2, max = 200, message = "丢失地点输入长度非法")
    private String lostPlace;

    private String lostTime;

    @Size(max = 300, message = "联系地址输入长度非法")
    private String concPlace;

    @Size(min = 1, max = 50, message = "联系人输入长度非法")
    private String concPersion;

    @NotNull(message = "手机号码不能为空")
    @Pattern(regexp = "^((19[0-9])|(17[0-9])|(14[0-9])|(13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$", message = "手机号码输入错误")
    private String phoneNo;

    @Pattern(regexp = "^[A-Za-z0-9\\u4e00-\\u9fa5]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$", message = "邮箱格式不正确")
    private String email;

    private String telPhoneNo;

    private String msn;

    private String qq;

    private Integer thankWay;

    @Range(min = 0, max = 99999999, message = "输入金额不正确")
    private BigDecimal thankMoneyAmount;

    @NotNull(message = "发布种类不能为空")
    @Size(min = 1, max = 1, message = "输入长度非法")
    private Integer goodsWay;

    @Size(min = 2, max = 100, message = "输入长度非法")
    private String findGoodsQuestion1;
    @Size(max = 100, message = "输入长度非法")
    private String findGoodsQuestion2;
    @Size(max = 100, message = "输入长度非法")
    private String findGoodsQuestion3;
    @Size(min = 2, max = 300, message = "输入长度非法")
    private String findGoodsAnswer1;
    @Size(max = 300, message = "输入长度非法")
    private String findGoodsAnswer2;
    @Size(max = 300, message = "输入长度非法")
    private String findGoodsAnswer3;

}
